package com.qixiucoding.entity;

import com.qixiucoding.property.MixPropertySourceFactory;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author longhj
 * @Description TODO
 * @Date 2021/10/05 星期二 12:42
 */
@Component
@Data
@PropertySource(value = {"classpath:family.yml"}, factory = MixPropertySourceFactory.class)
@ConfigurationProperties(prefix = "family")
// @PropertySource(value = {"classpath:family.properties"})
public class Family {
    @Resource
    Environment environment;
    private String familyName;
    private Father father;
    private Mother mother;
    private Child child;
}
